/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package inf3791.calendarsystem.shared;

/**
 *
 * @author Denis Moskal
 */
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;
import java.util.logging.Level;
import java.util.logging.Logger;

public class Configuration {

    private final Properties prop = new Properties();
    private final String fileName = "app.cfg";

    public Configuration() {
        try {
            InputStream is = new FileInputStream(fileName);
            prop.load (is);
        } catch (IOException ex) {
            Logger.getLogger(Configuration.class.getName()).log(Level.SEVERE, null, ex);
        }        
    }
    
    public String getLoginName(){
        return prop.getProperty("app.loginname");
    }
    
    public String getPassword(){
        return prop.getProperty("app.password");
    }
}
